//
//  LuckyQueryViewController.m
//  investevent
//
//  Created by jiangshao on 2019/1/22.
//  Copyright © 2019年 com.scj.investevent. All rights reserved.
//

#import "LuckyQueryViewController.h"
#import <AVOSCloud/AVOSCloud.h>
#import "NewStockDao.h"

@interface LuckyQueryViewController (){
    UILabel *emptyLabel;
}

@end

@implementation LuckyQueryViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title=@"中签查询";
    self.view.backgroundColor=[UIColor groupTableViewBackgroundColor];
//    AVQuery *query = [AVQuery queryWithClassName:@"ShowMe"];
//    [query getObjectInBackgroundWithId:@"1111" block:^(AVObject *object, NSError *error) {
//
//    }];
    [self.view addSubview:[self addHeadView]];
    emptyLabel=[UILabel new];
    [self.view addSubview:emptyLabel];
    [emptyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.view);
        make.centerX.equalTo(self.view);
    }];
    emptyLabel.text=@"暂无中签数据";
    // Do any additional setup after loading the view.
//    AVQuery *query = [AVQuery queryWithClassName:@"_Installation"];
//    [query getObjectInBackgroundWithId:@"_Installation" block:^(AVObject *object, NSError *error) {
//
//    }];
   NewStockDao * newStockDao=[[NewStockDao alloc]init];
     [newStockDao getNewStock];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

-(UIView *)addHeadView{
    NSInteger top=64;
    if (kDevice_Is_iPhoneX) {
        top=top+24;
    }
    UIView *view=[[UIView alloc]initWithFrame:CGRectMake(0, top, screenviewwidth, 45)];
    view.backgroundColor=themeColor;
    UILabel *name=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, screenviewwidth/4, view.frame.size.height)];
    name.text=@"股票代码";
    name.font=Font(15);
    name.textColor=[UIColor whiteColor];
    name.textAlignment=NSTextAlignmentCenter;
    [view addSubview:name];
    
    
    UILabel *fxs=[[UILabel alloc]initWithFrame:CGRectMake(name.frame.size.width, 0, screenviewwidth/4, view.frame.size.height)];
    fxs.text=@"中签股数";
    fxs.font=Font(15);
    fxs.textColor=[UIColor whiteColor];
    fxs.textAlignment=NSTextAlignmentCenter;
    [view addSubview:fxs];
    
    
    UILabel *fxj=[[UILabel alloc]initWithFrame:CGRectMake(fxs.frame.size.width+fxs.frame.origin.x, 0, screenviewwidth/4, view.frame.size.height)];
    fxj.text=@"现价";
    fxj.font=Font(15);
    fxj.textColor=[UIColor whiteColor];
    fxj.textAlignment=NSTextAlignmentCenter;
    [view addSubview:fxj];
    
    
    UILabel *sgsx=[[UILabel alloc]initWithFrame:CGRectMake(fxj.frame.size.width+fxj.frame.origin.x, 0, screenviewwidth/4, view.frame.size.height)];
    sgsx.text=@"浮赢";
    sgsx.font=Font(15);
    sgsx.textColor=[UIColor whiteColor];
    sgsx.textAlignment=NSTextAlignmentCenter;
    [view addSubview:sgsx];
    return view;
}


@end
